package com.asiainfo.sqlextractor.constant;

import com.alibaba.fastjson.JSON;

import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;

public interface Def {

    Map<String, String> columns1 = new HashMap<String, String>() {
        {
            put("PROVINCE", "String");
            put("EPARCHY", "String");
            put("CITY", "String");
            put("ORDER_ID", "java.math.BigDecimal");
            put("CANCEL_TAG", "String");
            put("ID_NUMBER", "String");
            put("NUMBER_TYPE", "String");
            put("OLD_ORDER_ID", "String");
            put("CANCEL_DATE", "String");
            put("CANCEL_STAFF_ID", "String");
            put("CANCEL_DEPART_ID", "String");
            put("CREATE_DATE", "String");
            put("STAFF_ID", "String");
            put("DEPART_ID", "String");
            put("BUSSI_TYPE", "String");
            put("POST_TYPE", "String");
            put("CARD_TYPE", "String");
            put("TRADE_TYPE_CODE", "String");
            put("AGENT_CITY_CODE", "String");
            put("AGENT_DEPART_ID", "String");
            put("AGENT_SUP_MANAGER_ID", "String");
            put("SUPERMANAGER_ID", "String");
            put("SUPERMANAGER_NAME", "String");
            put("SUPERMAN_ID", "String");
            put("SUPERMAN_NAME", "String");
            put("SUPERNICK_ID", "String");
            put("SUPERNICK_NAME", "String");
            put("DEVELOP_DEPART_ID", "String");
            put("DEVELOP_DEPART_NAME", "String");
            put("DEVELOP_EPARCHY_CODE", "String");
            put("DEVELOP_STAFF_ID", "String");
            put("DEVELOP_STAFF_NAME", "String");
            put("DEVELOP_DATE", "String");
            put("PROD_EPARCHY_CODE", "String");
            put("PROD_CITY_CODE", "String");
            put("PROD_DEPART_ID", "String");
            put("PROD_SUPERMAN_ID", "String");
            put("PROD_SUP_MANAGER_ID", "String");
            put("IN_MODE_CODE", "String");
            put("SHARE_PHONE", "String");
            put("MERCHANT_STORE_ID", "String");
            put("TOUCH_TYPE", "String");
            put("SYSTEM_ID", "String");
            put("SHARE_PHONE", "String");
        }
    };

    Map<String, String> columns2 = new HashMap<String, String>() {
        {
            put("ITEM_CODE", "String");
            put("ITEM_VALUE", "String");
        }
    };

    public static void main(String[] args) {
        System.out.println(JSON.toJSONString(columns1));
        System.out.println(JSON.toJSONString(columns2));
        String res = columns1.entrySet().stream().map(e ->
                String.format("%s:java.lang.%s", e.getKey(), e.getValue())).collect(Collectors.joining(","));
        System.out.println(res);
//        for (Map.Entry<String, String> entry : columns1.entrySet()) {
//            System.out.println(entry.getKey());
//        }
    }

}
